<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="menu" content="mainMenu" />
<meta name="nav" content="0" />
<meta name="acc" content="1" />
<title>内部用户部门</title>
<script type="text/javascript"
	src="<c:url value='/ext/ui/jquery-ui-1.8.12.custom.min.js'/>"></script>
<link href="${ctx}/styles/lightness/jquery-ui-1.8.12.custom.css"
	rel="stylesheet" />
<script type="text/javascript">
	$(document).ready(function(){
		$("#adduserdept").click(
				function() {
					location.href = "${ctx}/account/insideuserdept!input.action?userId=${userId}&organizationId=${organizationId}";
				});
		$("#cloBtn").click(function(){
			window.close();
		});
	});
</script>
</head>
<body>
<form action="user_department.action" method="post" class="yform"
	id="mainForm"><input type="hidden" name="page.pageNo"
	id="pageNo" value="${page.pageNo}" /> <input type="hidden"
	name="page.orderBy" id="orderBy" value="${page.orderBy}" /> <input
	type="hidden" name="page.order" id="order" value="${page.order}" />
<div id="tabs" class="ui-tabs ui-widget ui-widget-content ui-corner-all">
<ul
	class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all ui-sortable">
	<li><a id="construction" class="ui-state-default ui-corner-top  "
		href="${ctx}/account/user!input.action?id=${userId}&label=inside">内部用户</a></li>
	<li><a id="construction" class="ui-state-default ui-corner-top ui-tabs-selected ui-state-active  "
		href="${ctx}/account/insideuserdept.action?userId=${userId}&organizationId=${organizationId}">用户部门</a></li>
</ul>
<div>
<table>
	<tr>
		<th>姓名</th>
		<th>部门名称</th>
		<th>职务</th>
		<th>开始日期</th>
		<th>结束日期</th>
		<th>操作</th>
	</tr>
	<c:forEach items="${page.result }" var="userDepartment">
		<tr>
			<td>${userDepartment.user.name }</td>
			<td>${userDepartment.department.depName }</td>
			<td>${userDepartment.officalPosition }</td>
			<td>${userDepartment.startDate }</td>
			<td>${userDepartment.endDate }</td>
			<td>
				<a href="${ctx}/account/insideuserdept!input.action?id=${userDepartment.id}&userId=${userId}&organizationId=${organizationId}" >修改</a>
				<a href="${ctx}/account/insideuserdept!delete.action?id=${userDepartment.id}&userId=${userId}&organizationId=${organizationId}" >删除</a>
			</td>
		</tr>
	</c:forEach>
</table>
</div>

<div id="pagebar">第${page.pageNo}页, 共${page.totalPages}页 <a
	href="javascript:jumpPage(1)">首页</a> <s:if test="page.hasPre">
	<a href="javascript:jumpPage(${page.prePage})">上一页</a>
</s:if> <s:if test="page.hasNext">
	<a href="javascript:jumpPage(${page.nextPage})">下一页</a>
</s:if> <a href="javascript:jumpPage(${page.totalPages})">末页</a></div>
<div class="type-button"><input id="adduserdept"
	 type="button" class="submit" value="新增" /> 
</div>
</div>
</form>
</body>
</html>